package com.flx.at.spring.code.test.testbeanregister.beanregister;

import com.flx.at.spring.code.test.testbeanregister.component.BeanE;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @Author: Fenglixiong
 * @Date: 2021/7/3 18:18
 * @Description:
 */
public class BeanRegister implements ImportBeanDefinitionRegistrar {

    @Override
    public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
        RootBeanDefinition beanDefinition = new RootBeanDefinition(BeanE.class);
        registry.registerBeanDefinition("beanE",beanDefinition);
    }
}
